<?php

namespace common\models\activity;

use Yii;

/**
 * This is the model class for table "{{%activity_enroll}}".
 *
 * @property int $id
 * @property int $activity_id
 * @property int $user_id
 * @property string $realname
 * @property string $idcardno
 * @property string $mobile
 * @property string|null $lntsno
 * @property string|null $cardno
 * @property string $paymode
 * @property int $status
 * @property int $created_at
 * @property int $updated_at
 */
class ActivityEnroll extends \common\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%activity_enroll}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['activity_id', 'user_id', 'status', 'created_at', 'updated_at'], 'integer'],
            [['realname', 'idcardno', 'mobile', 'paymode'], 'required'],
            [['realname', 'lntsno', 'cardno', 'paymode'], 'string', 'max' => 50],
            [['idcardno'], 'string', 'max' => 18],
            [['mobile'], 'string', 'max' => 11],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'activity_id' => 'Activity ID',
            'user_id' => 'User ID',
            'realname' => 'Realname',
            'idcardno' => 'Idcardno',
            'mobile' => 'Mobile',
            'lntsno' => 'Lntsno',
            'cardno' => 'Cardno',
            'paymode' => 'Paymode',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }

}
